<?php

class myCredentials extends sfFilter
{
  public function execute ($filterChain)
  {
      $request = $this->getContext()->getRequest();
      $response = $this->getContext()->getResponse();

      if(($skola_id = $request->getParameter('skola_id')))
      {
        $user = $this->getContext()->getUser();
        if(!in_array($skola_id, array_keys($user->getAttribute('skolas'))))
          die('Greska, kredencijali!!!');
      }

      $filterChain->execute();
  }
}